Skip to content

fix(profiles): remove leisure=track from foot profile routable ways#7542

Merged
DennisOSRM merged 3 commits intomasterfrom
remove_leisure_track
May 8, 2026
Merged

fix(profiles): remove leisure=track from foot profile routable ways#7542
DennisOSRM merged 3 commits intomasterfrom
remove_leisure_track

Conversation

@DennisOSRM
Copy link
Copy Markdown
Collaborator

@DennisOSRM DennisOSRM commented May 7, 2026

Summary

Removes leisure=track from the foot profile's list of routable way types, fixing #4312.

Problem

The foot profile was treating leisure=track as a walkable surface and routing pedestrians over it. However, according to the OSM wiki, leisure=track describes a sports or race track (athletics track, velodrome, horse racing circuit, etc.) — not a path intended for general pedestrian use.

This caused OSRM to generate routes through areas that are typically restricted to athletes/competitors, or physically unsuitable for walking (e.g., a running track around a sports field, a velodrome).

Changes

  • Removes speeds.leisure.track from the speeds table in setup()
  • Removes the leisure key lookup in process_way() (no other leisure tags are used by the profile)

Functional Impact

Ways tagged with leisure=track will no longer be considered routable by the foot profile. Pedestrians will no longer be routed through race/sports tracks.

leisure=track refers to a sports/race track (athletics track, velodrome,
etc.) and is not intended as a walking path. Routing pedestrians over
this tag was incorrect per OSM tagging conventions.

Removes leisure=track from the whitelisted surface types and stops
fetching the leisure key during way processing entirely.

Closes #4312

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 7, 2026 18:37

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@DennisOSRM DennisOSRM merged commit af01ad8 into master May 8, 2026
26 checks passed
@DennisOSRM DennisOSRM deleted the remove_leisure_track branch May 8, 2026 08:11
DennisOSRM added a commit that referenced this pull request May 8, 2026
…le (#7541)

* feat(profiles): handle priority=forward/backward way tag in car profile

Implements support for the OSM `priority=*` tag (closes #4387).
When a way is tagged `priority=forward` the backward direction receives
a configurable speed/weight penalty (default 0.7×); `priority=backward`
applies the same penalty to the forward direction.

Changes:
- profiles/car.lua: add `priority_penalty = 0.7` config knob
- profiles/lib/way_handlers.lua: read `priority` tag and apply
  per-direction penalty inside WayHandlers.penalties()
- taginfo.json: document the two new priority tag values

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: address review feedback on priority tag handling

- Remove inaccurate 'narrow roads' qualifier from priority_penalty comment;
  the penalty applies to any way tagged priority=forward/backward regardless
  of road width
- Fix misleading scenario title: penalty does apply to oneways when the
  permitted direction lacks priority, rename accordingly
- Fix feature file description that incorrectly said 'narrow sections'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(profiles): remove leisure=track from foot profile routable ways (#7542)

* fix(ci): follow-up to #7485 — unblock certain macOS configurations (#7543)

* fix(ci): follow-up to #7485 — unblock certain macOS configurations

Follow-up to #7485 to unblock certain macOS configurations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: allow unused include directives on macOS

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(profiles): avoid losing directional priority penalty when weight is bidirectional

Only set result.weight when forward and backward penalties are equal; add comment clarifying priority_penalty semantics\n\nAddresses PR #7541\n\nTests: features/car/priority.feature passes locally

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test(car): add scenario asserting directional penalty avoids bidirectional weight

Covers PR #7541

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(profiles/cmake/tests): address PR review comments

- Clarify priority_penalty semantics and scope in car.lua and way_handlers.lua\n- Only set bidirectional weight when penalties are equal (prior change)\n- Rename oneway scenario for clarity and rename duplicate foot scenario\n- Gate unused-command-line-argument warning on Clang/AppleClang in cmake/warnings.cmake\n\nAddresses PR #7541 review threads

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants